

// 定义iYox
var iYox = {
    name: 'iYox - 基于Yox的前端UI组件库',
    version: '0.0.1'
};


// 过滤器导入
import sliceName from './filters/sliceName';
import stamp2time from './filters/stamp2time';
import timeStamp from './filters/timeStamp';

var filters = {
    // 统一放到io对象下，避免冲突。使用 io.filter(props)
    io: {
        sliceName: sliceName,
        stamp2time: stamp2time,
        timeStamp: timeStamp
    }
};



// 指令导入
import log from './directives/log';
import hover from './directives/hover';
import clickOut from './directives/clickOut';
import isShow from './directives/isShow';

import tips from './directives/tips';

var directives = {
    // log: log,
    hover: hover,
    clickOut: clickOut,
    // isShow: isShow,
    // tips: tips
};



// 组件导入
import comp from './components/comp/index';
import checkbox from './components/checkbox/index';

import radioGroup from './components/radioGroup/index';
import radio from './components/radio/index';


import select from './components/select/index';
import selectOption from './components/selectOption/index';

import progress from './components/progress/index';
import rate from './components/rate/index';
import pagination from './components/pagination/index';

import slider from './components/slider/index';
import sliders from './components/sliders/index';

import countUp from './components/countUp/index';

import grid from './components/grid/index';

import alert from './components/alert/index';

var components = {
    "io-alert":alert,
    "io-comp": comp,
    "io-checkbox": checkbox,
    "io-radioGroup": radioGroup,
    "io-radio": radio,
    "io-select": select,
    "io-selectOption": selectOption,
    "io-progress": progress,
    "io-rate": rate,
    "io-slider": slider,
    
    "io-pagination": pagination,
    "io-countUp": countUp,

    "io-grid": grid,
    "io-sliders": sliders,
    
}


// 初始化-注册各个部件
iYox.init = function(){
    Yox.filter(filters);
    Yox.directive(directives);
    Yox.component(components);
}

// 如果存在Yox，则自动执行初始化
if(typeof Yox == 'function'){
    iYox.init();
}

// 默认导出
export default iYox;

